import Vue from 'vue'
import App from './App.vue'
import index from './router'
import store from './store'
import './plugins/element.js'
// import ElementUI from './plugins/element'
import  TreeTable from 'vue-table-with-tree-grid'

//导入全局样式表

import './assets/css/global.css'

import axios from "axios";
//配置请求的根路径
axios.defaults.baseURL='http://timemeetyou.com:8889/api/private/v1/'

//axios请求拦截
axios.interceptors.request.use(config=> {
  console.log(config)
  //为请求对象，添加token验证的Authorization字段。
  config.headers.Authorization=window.sessionStorage.getItem('token');
  //在最后必须return config
  return config;
})
Vue.prototype.$http=axios;


Vue.config.productionTip = false


Vue.component('tree-table',TreeTable)

new Vue({
  router: index,
  store,
  render: h => h(App)
}).$mount('#app')
